package com.hl.wuyeguanliIDEA.web;

import com.hl.wuyeguanliIDEA.pojo.Schedule;
import com.hl.wuyeguanliIDEA.pojo.Shift;
import com.hl.wuyeguanliIDEA.service.ScheduleService;
import com.hl.wuyeguanliIDEA.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/schedule")
public class ScheduleController {
    @Autowired
    private ScheduleService scheduleService;

    @RequestMapping("/selectList")
    public R selectList(){
        List<Schedule> num = scheduleService.selectList();
        return R.success(num);
    }

    @RequestMapping("/attendancesList")
    public R attendancesList(Integer id){
        List<Schedule> num1 = scheduleService.attendancesList(id);
        return R.success(num1);
    }
}
